package com.lanou3g.ptp.achievement.mapper;

import com.lanou3g.ptp.entity.Report;
import com.lanou3g.ptp.entity.ReportSponsor;
import com.lanou3g.ptp.vo.ReportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 创建人: 武奇
 * 创建事件: 2019/8/29
 */
@Mapper
public interface ReportMapper {

    Report findById(Long reportId);

    List<ReportVO> findByTaskIdAndStudentId(@Param("taskId") Long taskId, @Param("studentId") Long studentId);

    void excellentReport(Long reportId);

    int insert(Report report);

    List<ReportSponsor> findSponsorsByStudentId(Long studentId);

    boolean putStudentReport(Report report);


    int insertReportSponsor(ReportSponsor reportSponsor);

    List<ReportSponsor> findSponsorsByStudentIdAndTaskId(@Param("studentId") Long studentId,
                                                         @Param("taskId") Long taskId);

    List<Report> findMyReportsByTaskId(@Param("studentId") Long studentId,
                                       @Param("taskId") Long taskId);
}
